


#include "sensors.h"


#include <util/delay.h>
#include "structures.h"
#include <avr/interrupt.h>


#include "FreeRTOS.h"
#include "task.h"

#include <util/delay.h>
/************************************************************************************************* 

	Name: SENSORS_C
	Autor: JA&AP
	
	Contains: 
				File containing all the functions related to the Sensors hardware.
				
				
**************************************************************************************************/

void sensors_init(void){
	ir_init();
	ir_activateAll(ON);
	
	bumpers_init();
	
	battery_init();
	sonar_init();
}

void sensors_readAll(sensors_t *sens)
{
	sens->sensorsIR = sensors_getIR();
	sens->bumpers = sensors_getBumpers();
	sens->batt.battState = sensors_getBattState();
	sens->batt.battVoltage = sensors_getBattVoltage();
}
